home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Datafile PD-CD 1 Issue 2
/
PDCD-1 - Issue 02.iso
/
_utilities
/
utilities
/
003
/
motorola
/
Sources
/
c
/
output
< prev
next >
Wrap
Text File
|
1993-07-18
|
1KB
|
47 lines
#include <stdio.h>
#include "mselect.h" /*external selection of microprocessor symbol table*/
#include "proto.h"
#include "as.h"
#include "structs.h"
#include "extvars.h"
/*
* stable --- prints the symbol table in alphabetical order
*/
void
stable(struct nlist * ptr)
{
if (ptr != NULL) {
stable(ptr->Lnext);
fprintf(Mapfil, "%-10s %04x\n", ptr->name, ptr->def);
stable(ptr->Rnext);
}
}
/*
* cross -- prints the cross reference table
*/
void
cross(struct nlist * point)
{
struct link *tp;
int i = 1;
if (point != NULL) {
cross(point->Lnext);
fprintf(Xfil, "%-10s %04x *", point->name, point->def);
tp = point->L_list;
while (tp != NULL) {
if (i++ > 10) {
i = 1;
fprintf(Xfil, "\n ");
}
fprintf(Xfil, "%04d ", tp->L_num);
tp = tp->next;
}
fprintf(Xfil, "\n");
cross(point->Rnext);
}
}